import fly from './fly'

class Service {
  ///bike/get/price/rule/h5/v2
  //收费标准
  chargeDetail(params) {
    return fly.post(' /bike/get/price/rule/h5/v2', params)
      .then(res => res.data)
  }
  //实名认证
  realName(params) {
    return fly.post('/bike/add/real/name', params)
      .then(res => res.data)
  }
  jscode2session(params) {
    return fly.get('/bike/auth/wechat/miniprogram', params)
      .then(res => res.data)
  }
  //检查订单状态
  getOrderStatus(params) {
    return fly.post('/bike/order/status', params)
      .then(res => res.data)
  }
  //手机号获取验证码
  getMessage(params) {
    return fly.post('/bike/login/send/message/applet', params)
      .then(res => res.data)
  }

  //登录
  login(params) {
    return fly.post('/bike/login/by/mobile', params)
      .then(res => res.data)
  }
   //亲情支付订单
   payQinqing(params) {
    return fly.post('/bike/mi/coin/pay/base', params)
      .then(res => res.data)
  }
  //预支付
  prePay(params) {
    return fly.post('/bike/pre/pay', params)
      .then(res => res.data)
  }
  //体验卡预支付
  expPay(params) {
    return fly.post('/bike/exp/pay', params)
      .then(res => res.data)
  }
  //查询adcode
  getAdCode(params) {
    return fly.post('/bike/search/adCode', params)
      .then(res => res.data)
  }
  //获取服务区域
  getServiceArea(params) {
    return fly.post('/bike/search/service/area/v2', params)
      .then(res => res.data)
  }
  //获取运营区域
  getOperateArea(params) {
    return fly.post('/bike/search/operate/area/v2', params)
      .then(res => res.data)
  }
  //获取禁行区域
  getForbidArea(params) {
    return fly.post('/bike/search/forbid/travel/v2', params)
      .then(res => res.data)
  }
  //获取大还车区域
  getBigReturnArea(params) {
    return fly.post('/bike/search/big/return/area/v2', params)
      .then(res => res.data)
  }
  //获取附近的还车区和车辆
  getNearBikeArea(params) {
    return fly.post('/bike/search/near/bike/and/area', params)
      .then(res => res.data)
  }
  //获取车辆详情
  getBikeDetail(params) {
    return fly.post('/bike/search/bike/detail/v3', params)
      .then(res => res.data)
  }
  //获取车辆详情v3
  getBikeDetailv3(params) {
    return fly.post('/bike/search/bike/detail/v3', params)
      .then(res => res.data)
  }
  //下单
  makeOrder(params) {
    return fly.post('/bike/make/order', params)
      .then(res => res.data)
  }
  //5s刷新费用和位置
  refreshInfo(params) {
    return fly.post('/bike/refresh/info/v2', params)
      .then(res => res.data)
  }
  //预还车
  preReturnBike(params) {
    return fly.post('/bike/pre/return/v2', params)
      .then(res => res.data)
  }
  //还车
  returnBike(params) {
    return fly.post('/bike/return/v2', params)
      .then(res => res.data)
  }
  //费用明细
  getCostDetail(params) {
    return fly.post('/bike/get/cost/detail/new', params)
      .then(res => res.data)
  }
  //蜜币支付订单
  payMCoin(params) {
    return fly.post('/bike/pay/mCoin', params)
      .then(res => res.data)
  }
  //企业支付
  payBusiness(params) {
    return fly.post('/bike/business/pay', params)
      .then(res => res.data)
  }
  //退款
  refund(params) {
    return fly.post('/bike/refund/deposit', params)
      .then(res => res.data)
  }
  //车辆指令
  sendBox(params) {
    return fly.post('/bike/send/box', params)
      .then(res => res.data)
  }
  //个人中心
  getperson(params){
    return fly.post('/bike/personal/center', params)
      .then(res => res.data)
  }
  //获取当前运营城区adcode
  getOperateAdcode(params){
    return fly.post('/bike/search/operate/city', params)
      .then(res => res.data)
  }
   //查询优惠券
  getCoupons(params){
    return fly.post('/bike/search/personal/coupons', params)
      .then(res => res.data)
  }
   //我得钱包
   getwallet(params){
    return fly.post('/bike/search/my/wallet', params)
      .then(res => res.data)
    }
    //我得行程
    gettrips(params){
     return fly.post('/bike/get/user/trips', params)
     .then(res => res.data)
    }
    //用车中 附近还车区域
  inuseReturnArea(params){
    return fly.post('/bike/search/return/area/v3', params)
      .then(res => res.data)
  }
  //查询运营区域
  searchArea(params){
    return fly.post('/bike/travel/search/area', params)
      .then(res => res.data)
  }
  //广告接口
  getNotice(params) {
    return fly.post('/bike/select/notice', params)
      .then(res => res.data)
  }
  //登录跳转判断
  checkLogin(params) {
    return fly.post('/exc/check/login', params)
      .then(res => res.data)
  }
  //用户没有交押金,展示可行的解决方法
  getDepositPay(params) {
    return fly.post('/bike/pay/deposit', params)
      .then(res => res.data)
  }
  //获取卡券列表
  getProductList(params) {
    return fly.post('/bike/get/product/list', params)
      .then(res => res.data)
  }
  //获取卡券详情
  getCouponProductsDetails(params) {
    return fly.post('/bike/cardMall/getCouponProductsDetails', params)
      .then(res => res.data)
  }

  //押金明细
  depositDetail(params) {
    return fly.post('/bike/get/depositDetail', params)
      .then(res => res.data)
  }
  //押金列表
  depositList(params) {
    return fly.post('/bike/get/depositList', params)
      .then(res => res.data)
  }
  //卡券列表
  getCardList(params) {
    return fly.post('/bike/search/personal/card', params)
      .then(res => res.data)
  }
  //卡券明细
  getCardDetail(params) {
    return fly.post('/bike/get/unlimitedCardLog', params)
      .then(res => res.data)
  }
  //充值优惠列表
  getMCoin(params) {
    return fly.post('/bike/get/mCoin/rule', params)
      .then(res => res.data)
  }
  //充值 其他金额
  addOtherAmount(params) {
    return fly.post('/bike/other/amount', params)
      .then(res => res.data)
  }
  //充值卡
  micardPay(params) {
    return fly.post('/bike/micard/pay', params)
      .then(res => res.data)
  }
  //添加亲情账号
  addFamilyCard(params) {
    return fly.post('/bike/familyCard/add', params)
      .then(res => res.data)
  }
  //添加亲情账号
  boundFamilyCard(params) {
    return fly.post('/bike/familyCard/bound', params)
      .then(res => res.data)
  }
  //亲情账号列表
  getFamilyCardList(params) {
    return fly.post('/bike/familyCard/boundList', params)
      .then(res => res.data)
  }
  //亲情账号详情
  getFamilyCardInfo(params) {
    return fly.post('/bike/familyCard/info', params)
      .then(res => res.data)
  }
  //修改亲情账号昵称
  updateRemark(params) {
    return fly.post('/bike/familyCard/updateRemark', params)
      .then(res => res.data)
  }
  //解绑亲情账号
  unbound(params) {
    return fly.post('/bike/familyCard/unbound', params)
      .then(res => res.data)
  }
  //保证金记录
  getBondLog(params) {
    return fly.post('/bike/get/bondLog', params)
      .then(res => res.data)
  }
  //保证金详情
  getBondDetail(params) {
    return fly.post('/bike/adopt/withdraw/result', params)
      .then(res => res.data)
  }
  //保证金提现
  refundAuditing(params) {
    return fly.post('/bike/refund/auditing', params)
      .then(res => res.data)
  }
}

export default new Service()
